﻿using CPPEI.WebApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.ETL.WebApi
{
    [CPPEI.WebApi.PostAction("SYS", "Logout", "1.0")]
    public class LogoutAction : BaseAction<LogoutParams, LogoutResult>
    {
        protected override ActionResult<LogoutResult> OnExecute(ActionContext context, 
            SysParameters sysParameters,
            LogoutParams opParams)
        {
            LogoutResult result = new LogoutResult();

            Intergration.Config.AuthProvider.IsAuth();

            Intergration.Config.AuthProvider.Delete();

            return new ActionResult<LogoutResult>(result);
        }
    }

    public class LogoutParams
    {
    }

    public class LogoutResult
    {
    }
}
